Component({
  data: {
    selected: 0,
    list: [{
      current: 0,
      pagePath: "/pages/index/index",
      text: "首页",
      iconClass:"cuIcon-homefill",
      iconTopClass:""
    }, {
      current: 0,
      pagePath: "/pages/publish/publish",
      text: "发布",
      iconClass:"cu-btn cuIcon-add bg-blue shadow",
      iconTopClass:"add-action"
    }, {
      current: 0,
      pagePath: "/pages/mine/mine",
      text: "我的",
      iconClass:"cuIcon-my",
      iconTopClass:""
    }]
  },
  attached() {
  },
  observers: {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.url;
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})